// ---------------------------------------------------------------------
//
// -- 角标
// -- author £
//
// ---------------------------------------------------------------------

cc.Class({
    extends: cc.Component,

    properties: {
        num: require('BaseNum')
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        this.node.active = false;
    },

    start () {

    },

    updateNum: function (num) {
        if (num <= 0) {
            this.hide();
            return;
        }

        this.show();
        this.num.updateNum(num);
    },

    show: function () {
        this.node.active = true;
    },  

    hide: function () {
        this.node.active = false;
    }, 

    // update (dt) {},
});
